<!--
 * @Description:
 * @Author 卞鹏飞 <228443632@qq.com>
 * @create 2023/1/3 09:41
 -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>
  </head>
  <body>
    <button onclick="onSendMsg()">发送消息</button>
    <script src="./lib/index.umd.js"></script>
    <script>

      const bus = window.sfutils.bus
      bus.on('sayHello', (...args) => {
        console.log('sayHello', ...args)
      })

      function onSendMsg() {
        bus.emit('sayHello', '23242', { name: '卞鹏飞' })
          console.log(bus)
      }


      console.log(window.sfutils.stringifyURL('/user?id=1234242', {id: 0, name: '财讯'}))

      let a = {name: 'a'}
      let b = {name: 'b'}
      a.b = b
      b.a = a
      // 输出 {"name":"a","b":{"name":"b"}}
      console.log(window.sfutils.stringifyCircularJSON(a))
    </script>
  </body>
</html>
